package com.yatush.products;

import java.util.ArrayList;
import java.util.List;

import com.yatush.backstage.web.BaseAction;
import com.yatush.backstage.web.Bean;
import com.yatush.products.ProductsListBean.Products;

public class ProductsListAction extends BaseAction {

	@Override
	protected void loadData(Bean newBean) {
		ProductsListBean bean = (ProductsListBean) newBean;
		Products p1 = new Products();
		Products p2 = new Products();
		Products p3 = new Products();
		p1.setDescription("Koka-kola");
		p1.setPrice("4.5");
		p2.setDescription("Twix");
		p2.setPrice("4");
		p3.setDescription("Falafel");
		p3.setPrice("14");
		List<Products> l = new ArrayList<Products>();
		l.add(p1);
		l.add(p2);
		l.add(p3);
		bean.setProductsList(l);
	}

	@Override
	protected String saveForm(Bean newBean) {
		ProductsListBean bean = (ProductsListBean) newBean;
		return null;
	}
}